﻿<UserControl x:Class="SqlMiM.SqlIndexes.Options.IndexOptions"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    MinHeight="200" MinWidth="200" Margin="10">
    <StackPanel>

        <TextBlock Foreground="{DynamicResource Foreground}" FontWeight="Bold" Margin="0,0,0,20">Fragmented Indexes</TextBlock>

        <StackPanel Orientation="Horizontal">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Get system tables :</TextBlock>
            <CheckBox IsChecked="{Binding IsSystemDatabasesEnabled}" Margin="10,5,5,5" VerticalAlignment="Center" />
        </StackPanel>

        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Max indexes count :</TextBlock>
            <ComboBox ItemsSource="{Binding MaxIndexesAvailables}" SelectedItem="{Binding MaxIndexes}"  
                      IsEditable="False" Width="150" Margin="5" VerticalAlignment="Center" />
        </StackPanel>

        <StackPanel Orientation="Horizontal">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Minimum fragmentation :</TextBlock>
            <Slider Margin="5" VerticalAlignment="Center" Minimum="5" Maximum="95"  Value="{Binding Path=AvgPercentFragmentation, Mode=TwoWay}" />
            <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Text="{Binding Path=AvgPercentFragmentation, Mode=OneWay}" />
            <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Text="%" />

        </StackPanel>

    </StackPanel>
</UserControl>
